function y= f( x )
d = 5;	
y = zeros(size(x))
for i = 1: length(x)
x1 = x(i)	
if ( x1 >=0 && x1 <= d-2 )
	y(i) =  .1
elseif (x1 >=d-2 && x1 <= d+2 )
	y(i) =  .4 * (-0.2 * x1 .* x1 - 0.2 * d * d + 2.0 * 0.2 * d * x1 + 0.01 * x1 - 0.01 * d + 0.9)
elseif (x1>=9 && x1 <=10)
	y(i) =  (0.1 * (x1 - .1))
else
	y(i)=0;
endif
endfor
endfunction		